-
Notifications
You must be signed in to change notification settings - Fork 1
138 lines (132 loc) · 7.66 KB
/
Pkg EdFi.Ods.Extensions.Homograph.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
name: Pkg EdFi.Ods.Extensions.Homograph
on:
push:
branches: [main, 'b-v*-patch*','feature-*']
workflow_dispatch:
inputs:
distinct_id:
description: 'distinct ID for Rebuild Database Templates workflow'
required: false
default: 'distinct_id'
env:
INFORMATIONAL_VERSION: "7.2"
BUILD_INCREMENTER: "-496"
CONFIGURATION: "Release"
AZURE_ARTIFACT_URL: "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json"
AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}
VSS_NUGET_EXTERNAL_FEED_ENDPOINTS : '{"endpointCredentials": [{"endpoint": "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json","password": "${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}"}]}'
HEAD_REF: ${{ GITHUB.HEAD_REF }}
REF_NAME: ${{ GITHUB.REF_NAME }}
REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }}
REPOSITORY_OWNER: ${{ GITHUB.REPOSITORY_OWNER }}
jobs:
FindStandardAndExtensionVersions:
uses: Ed-Fi-Alliance-OSS/Ed-Fi-ODS/.github/workflows/Find Standard and Extension Versions.yml@874b608a0f3a14243e0035dd1222169fafcbe8d3
with:
calling_branch: ${{ github.head_ref || github.ref_name }}
extension_path: 'Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Homograph/EdFi.Ods.Extensions.Homograph.csproj'
build:
if: ${{ always() }}
needs: FindStandardAndExtensionVersions
runs-on: ubuntu-latest
strategy:
matrix:
StandardVersion: ${{ fromJson(needs.FindStandardAndExtensionVersions.outputs.StandardVersions) }}
ExtensionVersion: ${{ fromJson(needs.FindStandardAndExtensionVersions.outputs.ExtensionVersions) }}
name: build (Standard ${{ matrix.StandardVersion }} Extension ${{ matrix.ExtensionVersion }})
steps:
- name: Check for Azure token
if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.AZURE_ARTIFACT_NUGET_KEY == '' }}
run: |
echo "::error::Missing Azure Token"
exit 1
- name: echo distinct ID ${{ github.event.inputs.distinct_id }}
run: echo "${{ github.event.inputs.distinct_id }}"
- name: Checkout Ed-Fi-Extensions
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-Extensions
path: Ed-Fi-Extensions/
- name: Checkout Ed-Fi-ODS-Implementation
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation
path: Ed-Fi-ODS-Implementation/
- name: Checkout Ed-Fi-ODS
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS
path: Ed-Fi-ODS/
- name: Is pull request branch exists in Ed-Fi-ODS-Implementation
working-directory: ./Ed-Fi-Extensions/
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS-Implementation"
- name: Is pull request branch exists in Ed-Fi-ODS
working-directory: ./Ed-Fi-Extensions/
shell: pwsh
run: |
.\build.githubactions.ps1 CheckoutBranch -RelativeRepoPath "../Ed-Fi-ODS"
- name: update BUILD_INCREMENTER
run: |
$newRevision = ([int]${{ github.run_number }}) + ([int]${{env.BUILD_INCREMENTER}})
if ($newRevision -lt 0) {
$newRevision = 1
echo "BUILD_INCREMENTER=$newRevision">> $env:GITHUB_ENV
}
shell: pwsh
- name: Cache Nuget packages
uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 #v3.2.3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj*') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Run CodeGen
run: |
$ErrorActionPreference = 'Stop'
. $env:GITHUB_WORKSPACE/Ed-Fi-ODS-Implementation/Initialize-PowershellForDevelopment.ps1
Invoke-CodeGen -Engine PostgreSQL -ExtensionPaths $env:GITHUB_WORKSPACE/Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Homograph -StandardVersion ${{ matrix.StandardVersion }} -ExtensionVersion ${{ matrix.ExtensionVersion }}
shell: pwsh
- name: Restore NuGet packages
working-directory: ./Ed-Fi-Extensions/
run: |
.\build.githubactions.ps1 restore -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Homograph/EdFi.Ods.Extensions.Homograph.csproj"
shell: pwsh
- name: Build
working-directory: ./Ed-Fi-Extensions/
run: |
.\build.githubactions.ps1 build -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Homograph/EdFi.Ods.Extensions.Homograph.csproj" -StandardVersion ${{ matrix.StandardVersion }}
shell: pwsh
- name: Pack
working-directory: ./Ed-Fi-Extensions/
run: |
.\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.Ods.Extensions.Homograph.${{ matrix.ExtensionVersion }}.Standard.${{ matrix.StandardVersion }}" -ExtensionVersion ${{ matrix.ExtensionVersion }} -StandardVersion ${{ matrix.StandardVersion }} -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Homograph/EdFi.Ods.Extensions.Homograph.nuspec"
shell: pwsh
- name: Maximum Path Length Limitation Check
working-directory: ./Ed-Fi-Extensions/
run: |
.\build.githubactions.ps1 MaximumPathLengthLimitation -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.Ods.Extensions.Homograph.${{ matrix.ExtensionVersion }}.Standard.${{ matrix.StandardVersion }}"
shell: pwsh
- name: Install-credential-handler
if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }}
working-directory: ./Ed-Fi-Extensions/
run: |
.\build.githubactions.ps1 InstallCredentialHandler
shell: pwsh
- name: publish
if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }}
working-directory: ./Ed-Fi-Extensions/
shell: pwsh
run: |
.\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -ProjectFile "$env:GITHUB_WORKSPACE/Ed-Fi-Extensions/Extensions/EdFi.Ods.Extensions.Homograph/EdFi.Ods.Extensions.Homograph.csproj" -PackageName "EdFi.Suite3.Ods.Extensions.Homograph.${{ matrix.ExtensionVersion }}.Standard.${{ matrix.StandardVersion }}"
- name: Upload EdFi.Ods.Extensions.Homograph Artifact
if: success()
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: EdFi.Ods.Extensions.Homograph.Artifacts
path: ${{ github.workspace }}/Ed-Fi-Extensions/NugetPackages/*.*